/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Dec 31, 2009
 * Time: 10:31:25 AM
 * To change this template use File | Settings | File Templates.
 */
import java.util.*;
import org.jdom.Element;

// Referenced classes of package dk.brics.dsd:
//            Rule, Declaration, Validator, Schema,
//            Context

class DeclareRule extends Rule
{

    DeclareRule(Element element, Schema schema)
    {
        contents = Declaration.parseList(element, schema);
    }

    void checkRequirements(Context context, Set set)
    {
        Validator.debug("rule #" + number);
        for(Iterator iterator = contents.iterator(); iterator.hasNext(); ((Declaration)iterator.next()).checkRequirements(context, set));
    }

    void findDeclarations(List list)
    {
        for(Iterator iterator = contents.iterator(); iterator.hasNext(); ((Declaration)iterator.next()).findDeclarations(list));
    }

    List contents;
}